home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Readers / Gui4Cli / Docs / Tutorials / GadMods.gc < prev    next >
Text File  |  1997-12-02  |  2KB  |  98 lines

  1. G4C
  2.  
  3.  
  4. ; -----  Gadget Modifiers : GadFont, GadTitle, GadKey, and GadTxt
  5.  
  6. WinBig -1 -1 400 150 "GadMods.gc"
  7. WinType 11110001
  8.  
  9.  
  10. ; ---- Decorations
  11. BOX 0 0 0 0 OUT RIDGE
  12. SQUARE 6 18 192 63 2 NOFILL
  13. SQUARE 202 18 192 63 2 NOFILL
  14. SQUARE 6 82 192 63 2 NOFILL
  15. SQUARE 202 82 192 63 2 NOFILL
  16. LINE 6 81 392 81 3
  17. LINE 198 18 198 144 3
  18. LINE 200 18 200 144 3
  19.  
  20. xonLoad
  21. GuiOpen GadMods.gc
  22.  
  23. xonClose
  24. GuiQuit GadMods.gc
  25.  
  26. ; ---- Headings
  27.  
  28. Text 130 4 100 12 'Gadget Modifiers' 17 NOBOX
  29. Text 80 20 60 10 'GadFont' 7 NOBOX
  30. Text 260 20 70 10 'GadTitle' 8 NOBOX
  31. Text 25 84 190 10 'GadKey - Press them' 20 NOBOX
  32. Text 270 84 60 10 'GadTxt' 8 NOBOX
  33.  
  34. ; ------------ GadFont
  35.  
  36. xButton 50 30 100 12 "topaz 9"
  37. GadFont topaz.font 9 000
  38.  
  39. xButton 50 45 100 15 "topaz 11"
  40. GadFont topaz.font 11 000
  41.  
  42. xButton 30 63 140 12 "topaz 9 BOLD"
  43. GadFont topaz.font 9 010
  44.  
  45. ; ------------ GadTitle
  46.  
  47. xTextIn 220 40 40 12 'Above' v '' 32
  48. GadTitle ABOVE
  49.  
  50. xTextIn 290 40 40 12 'Right' v '' 32
  51. GadTitle RIGHT
  52.  
  53. xTextIn 220 54 40 12 'Below' v '' 32
  54. GadTitle BELOW
  55.  
  56. xTextIn 330 54 40 12 'Left' v '' 32
  57. ;GadTitle LEFT
  58.  
  59. ; ------------ GadKey
  60. ;    Allows a key press as a 'short cut' for a button
  61.  
  62. xButton 40 96 32 12 'A'
  63. GadKey A
  64. Update Gadmods.gc 1 'That was A'
  65.  
  66.  
  67. xButton 40 112 32 12 '_B'
  68. ;    GadKey is not used here. Instead, the underscore character
  69. ;    precedes the letter B, which has the same effect.
  70. Update Gadmods.gc 1 'That was B'
  71.  
  72.  
  73. xButton 20 128 82 12 "A space"
  74. ;    Here, the NUMBER of the key is given instead of a character.
  75. ;    '32' is a space, and the '#' sets the command to read a number.
  76. ;    See elsewhere for coverage of VANILLA and RAW keys.
  77. GadKey #32
  78. Update Gadmods.gc 1 'A Space'
  79.  
  80.  
  81. ;    A text gadget to show confirmation of the keypresses.
  82.  
  83. Text 110 104 60 12 '          ' 10 NOBOX
  84. gadid 1
  85.  
  86. ;-------------- GadTxt
  87. ;     Position text left, centre, or right
  88.  
  89. Text 226 98 140 12 'Left' 4 BOX
  90. GadTxt Left
  91.  
  92. ;      'Centre' in real English ; 'Center' in American English
  93. Text 226 113 140 12 'Centre' 6 BOX
  94. GadTxt Center
  95. Text 226 128 140 12 'Right' 5 BOX
  96. GadTxt Right
  97.  
  98.